package com.sac.common.utils;

import com.sac.approval.service.*;
import com.sac.system.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

/**
 * @author xiaodong
 * @title
 * @date 2018/12/6 14:18
 * @desc
 */
@Component
public class ServiceManager {

	public static EmailService emailService;

	public static ApprovalService approvalService;

	public static ApprovalLineService approvalLineService;

	public static AttachmentService attachmentService;

    public static UserService userService;

	public static ApprovalQueryService approvalQueryService;

    public static ApprovalLineTemplateService approvalLineTemplateService;

    public static ApprovalTemplateService approvalTemplateService;

	@Autowired
    public void setEmailService(EmailService emailService) {
        ServiceManager.emailService = emailService;
    }

    @Autowired
    public void setApprovalService(ApprovalService approvalService) {
        ServiceManager.approvalService = approvalService;
    }

	@Autowired
    public void setApprovalLineService(ApprovalLineService approvalLineService) {
        ServiceManager.approvalLineService = approvalLineService;
    }

	@Autowired
    public void setAttachmentService(AttachmentService attachmentService) {
        ServiceManager.attachmentService = attachmentService;
    }

	@Autowired
    public void setUserService(UserService userService) {
        ServiceManager.userService = userService;
    }

	@Autowired
    public void setApprovalQueryService(ApprovalQueryService approvalQueryService) {
        ServiceManager.approvalQueryService = approvalQueryService;
    }

    @Autowired
    public void setApprovalLineTemplateService(ApprovalLineTemplateService approvalLineTemplateService) {
        ServiceManager.approvalLineTemplateService = approvalLineTemplateService;
    }

    @Autowired
    public void setApprovalTemplateService(ApprovalTemplateService approvalTemplateService) {
        ServiceManager.approvalTemplateService = approvalTemplateService;
    }
}
